<?php

namespace hiduoke\services\formBuilder\form;

use FormBuilder\Driver\FormComponent;
use FormBuilder\Factory\Elm;

class DkAddonGroupSelect extends FormComponent
{

    public function createValidate()
    {
        return Elm::validateStr();
    }

    /**
     * Dialog 自身是否插入至 body 元素上。
     * @return DkAddonGroupSelect
     */
    public function appendToBody()
    {
        return $this->props(['appendToBody' => true]);
    }

    public function addonsExplain($addons = [])
    {
        return $this->props(['addonsExplain' => $addons]);
    }

    public function data($data)
    {
        return $this->props(['addonData' => $data]);
    }
}
